package org.luxor.cloud.portal.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.luxor.cloud.portal.entity.OauthClientDetailsEntity;
import org.luxor.cloud.portal.mapper.OauthClientDetailsMapper;
import org.luxor.cloud.portal.service.IOauthClientDetailsService;
import org.luxor.commons.core.utils.BeanUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 客户端详情
 *
 * @author administrator @date 2020-10-29 14:27:54
 */
@Service("oauthClientDetailsService")
public class OauthClientDetailsServiceImpl extends ServiceImpl<OauthClientDetailsMapper, OauthClientDetailsEntity> implements IOauthClientDetailsService {

    @Override
    public IPage<OauthClientDetailsEntity> page(IPage<OauthClientDetailsEntity> page, Map query) {
        OauthClientDetailsEntity queryEntity = BeanUtils.toObject(OauthClientDetailsEntity.class, query);
        return super.page(page, Wrappers.query(queryEntity));
    }
}
